public class Task03 {
    public static void main(String[] args) {
        System.out.println("这个百鸡问题的所有可能如下：");
        for (int cock = 0; cock <= 33; cock++) {
            for (int hen = 0; hen <= 50; hen++) {
                if ((cock * 3 + hen * 2 + (100 - cock - hen) / 3) == 100 && (100 - cock - hen) % 3 == 0) {
                    System.out.println("公鸡："+cock+",母鸡："+hen+",小鸡："+(100-cock-hen));
                }

            }
        }
    }
}
